

#include "route.h"

namespace ai_sim {
RouteAlgorithm* RouteAlgorithm::get(ClusterType type) {
    if (type == ClusterType::ElectricalCluster) {
        return new RoceClusterRouteAlgorithm();
    }
    else if (type == ClusterType::IbCluster) {
    	return new IBClusterRouteAlgorithm();
    }
    else {
        throw omnetpp::cRuntimeError("DONT SUPPORT THE CLUSTER TYPE");
        return nullptr;
    }
}

bool RouteAlgorithm::selectInMachine(
    omnetpp::cModule* mod, void * parent) {
    return mod->getParentModule() == (omnetpp::cModule*)parent;
}
}  // namespace ai_sim
